package abstractfactoryp;

import factoryp.Audi;
import factoryp.BMW;
import factoryp.CarInterface;
import factoryp.Tesla;

public class CarFactory extends SuperFactory {
    public CarInterface  getCar(String brandName){
        if (brandName==null){
            return null;
        }
        if (brandName.equalsIgnoreCase("Audi")){return new Audi();}else
        if (brandName.equalsIgnoreCase("BMW")){return new BMW();}else
        if (brandName.equalsIgnoreCase("Tesla")){return new Tesla();}
        return null;

    }

    public MaterialInterface getMaterial(String materialName) {
        return null;
    }
}
